.class public Lcom/waiqin365/base/calendar/ScrollLayout;
.super Landroid/widget/FrameLayout;

# interfaces
.implements Lcom/waiqin365/base/calendar/views/f;
.implements Lcom/waiqin365/base/calendar/views/g;
.implements Lcom/waiqin365/base/calendar/views/h;
.implements Lcom/waiqin365/base/calendar/views/i;
.implements Lcom/waiqin365/base/calendar/views/o;
.implements Lcom/waiqin365/base/calendar/views/p;


# instance fields
.field private a:Landroid/support/v4/widget/ViewDragHelper;

.field private b:Lcom/waiqin365/base/calendar/views/MonthView;

.field private c:Lcom/waiqin365/base/calendar/views/WeekView;

.field private d:Landroid/widget/LinearLayout;

.field private e:Landroid/widget/LinearLayout;

.field private f:I

.field private g:I

.field private h:I

.field private i:I

.field private j:Landroid/view/View;

.field private k:I

.field private l:I

.field private m:I

.field private n:Z

.field private o:Lcom/waiqin365/base/calendar/b;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    const/4 v0, 0x0

    invoke-direct {p0, p1, v0}, Lcom/waiqin365/base/calendar/ScrollLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1

    const/4 v0, 0x0

    invoke-direct {p0, p1, p2, v0}, Lcom/waiqin365/base/calendar/ScrollLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 3

    const/4 v2, 0x1

    invoke-direct {p0, p1, p2, p3}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    iput-boolean v2, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->n:Z

    invoke-static {p1}, Landroid/view/ViewConfiguration;->get(Landroid/content/Context;)Landroid/view/ViewConfiguration;

    move-result-object v0

    invoke-virtual {v0}, Landroid/view/ViewConfiguration;->getScaledTouchSlop()I

    move-result v0

    iput v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->l:I

    const/high16 v0, 0x41500000    # 13.0f

    invoke-virtual {p0}, Lcom/waiqin365/base/calendar/ScrollLayout;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v1

    invoke-static {v2, v0, v1}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F

    move-result v0

    float-to-int v0, v0

    iput v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->k:I

    new-instance v0, Lcom/waiqin365/base/calendar/a;

    invoke-direct {v0, p0}, Lcom/waiqin365/base/calendar/a;-><init>(Lcom/waiqin365/base/calendar/ScrollLayout;)V

    invoke-static {p0, v0}, Landroid/support/v4/widget/ViewDragHelper;->create(Landroid/view/ViewGroup;Landroid/support/v4/widget/ViewDragHelper$Callback;)Landroid/support/v4/widget/ViewDragHelper;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->a:Landroid/support/v4/widget/ViewDragHelper;

    return-void
.end method

.method static synthetic a(Lcom/waiqin365/base/calendar/ScrollLayout;I)I
    .locals 0

    iput p1, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->i:I

    return p1
.end method

.method static synthetic a(Lcom/waiqin365/base/calendar/ScrollLayout;)Landroid/widget/LinearLayout;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->d:Landroid/widget/LinearLayout;

    return-object v0
.end method

.method static synthetic a(Lcom/waiqin365/base/calendar/ScrollLayout;Z)Z
    .locals 0

    iput-boolean p1, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->n:Z

    return p1
.end method

.method static synthetic b(Lcom/waiqin365/base/calendar/ScrollLayout;)I
    .locals 1

    iget v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->h:I

    return v0
.end method

.method static synthetic c(Lcom/waiqin365/base/calendar/ScrollLayout;)Z
    .locals 1

    iget-boolean v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->n:Z

    return v0
.end method

.method static synthetic d(Lcom/waiqin365/base/calendar/ScrollLayout;)Lcom/waiqin365/base/calendar/views/MonthView;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->b:Lcom/waiqin365/base/calendar/views/MonthView;

    return-object v0
.end method

.method static synthetic e(Lcom/waiqin365/base/calendar/ScrollLayout;)Lcom/waiqin365/base/calendar/views/WeekView;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->c:Lcom/waiqin365/base/calendar/views/WeekView;

    return-object v0
.end method

.method static synthetic f(Lcom/waiqin365/base/calendar/ScrollLayout;)I
    .locals 1

    iget v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->g:I

    return v0
.end method

.method static synthetic g(Lcom/waiqin365/base/calendar/ScrollLayout;)Landroid/widget/LinearLayout;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->e:Landroid/widget/LinearLayout;

    return-object v0
.end method

.method static synthetic h(Lcom/waiqin365/base/calendar/ScrollLayout;)Lcom/waiqin365/base/calendar/b;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->o:Lcom/waiqin365/base/calendar/b;

    return-object v0
.end method

.method static synthetic i(Lcom/waiqin365/base/calendar/ScrollLayout;)I
    .locals 1

    iget v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->f:I

    return v0
.end method

.method static synthetic j(Lcom/waiqin365/base/calendar/ScrollLayout;)Landroid/view/View;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->j:Landroid/view/View;

    return-object v0
.end method

.method static synthetic k(Lcom/waiqin365/base/calendar/ScrollLayout;)Landroid/support/v4/widget/ViewDragHelper;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->a:Landroid/support/v4/widget/ViewDragHelper;

    return-object v0
.end method


# virtual methods
.method public a(I)V
    .locals 1

    iput p1, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->f:I

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->c:Lcom/waiqin365/base/calendar/views/WeekView;

    invoke-virtual {v0, p1}, Lcom/waiqin365/base/calendar/views/WeekView;->setLine(I)V

    return-void
.end method

.method public a(Lcom/waiqin365/base/calendar/c/a;)V
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->c:Lcom/waiqin365/base/calendar/views/WeekView;

    invoke-virtual {v0, p1}, Lcom/waiqin365/base/calendar/views/WeekView;->a(Lcom/waiqin365/base/calendar/c/a;)V

    return-void
.end method

.method public a(Z)V
    .locals 1

    if-eqz p1, :cond_0

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->c:Lcom/waiqin365/base/calendar/views/WeekView;

    invoke-virtual {v0}, Lcom/waiqin365/base/calendar/views/WeekView;->a()V

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->c:Lcom/waiqin365/base/calendar/views/WeekView;

    invoke-virtual {v0}, Lcom/waiqin365/base/calendar/views/WeekView;->b()V

    goto :goto_0
.end method

.method public a()Z
    .locals 1

    iget-boolean v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->n:Z

    return v0
.end method

.method public b(I)V
    .locals 1

    iput p1, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->g:I

    const/4 v0, 0x6

    if-ne p1, v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->c:Lcom/waiqin365/base/calendar/views/WeekView;

    invoke-virtual {v0, p1}, Lcom/waiqin365/base/calendar/views/WeekView;->setCount(I)V

    :cond_0
    return-void
.end method

.method public b(Lcom/waiqin365/base/calendar/c/a;)V
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->b:Lcom/waiqin365/base/calendar/views/MonthView;

    invoke-virtual {v0, p1}, Lcom/waiqin365/base/calendar/views/MonthView;->a(Lcom/waiqin365/base/calendar/c/a;)V

    return-void
.end method

.method public b(Z)V
    .locals 1

    if-eqz p1, :cond_0

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->b:Lcom/waiqin365/base/calendar/views/MonthView;

    invoke-virtual {v0}, Lcom/waiqin365/base/calendar/views/MonthView;->a()V

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->b:Lcom/waiqin365/base/calendar/views/MonthView;

    invoke-virtual {v0}, Lcom/waiqin365/base/calendar/views/MonthView;->b()V

    goto :goto_0
.end method

.method public computeScroll()V
    .locals 2

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->a:Landroid/support/v4/widget/ViewDragHelper;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/support/v4/widget/ViewDragHelper;->continueSettling(Z)Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-virtual {p0}, Lcom/waiqin365/base/calendar/ScrollLayout;->postInvalidate()V

    :cond_0
    return-void
.end method

.method protected measureChild(Landroid/view/View;II)V
    .locals 4

    const/4 v3, 0x0

    invoke-virtual {p1}, Landroid/view/View;->getVisibility()I

    move-result v0

    if-nez v0, :cond_0

    invoke-virtual {p1}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    invoke-virtual {p0}, Lcom/waiqin365/base/calendar/ScrollLayout;->getPaddingLeft()I

    move-result v1

    invoke-virtual {p0}, Lcom/waiqin365/base/calendar/ScrollLayout;->getPaddingRight()I

    move-result v2

    add-int/2addr v1, v2

    iget v0, v0, Landroid/view/ViewGroup$LayoutParams;->width:I

    invoke-static {p2, v1, v0}, Lcom/waiqin365/base/calendar/ScrollLayout;->getChildMeasureSpec(III)I

    move-result v0

    invoke-static {v3, v3}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v1

    invoke-virtual {p1, v0, v1}, Landroid/view/View;->measure(II)V

    :cond_0
    return-void
.end method

.method protected measureChildWithMargins(Landroid/view/View;IIII)V
    .locals 3

    invoke-virtual {p1}, Landroid/view/View;->getVisibility()I

    move-result v0

    if-nez v0, :cond_0

    invoke-virtual {p1}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    check-cast v0, Landroid/view/ViewGroup$MarginLayoutParams;

    iget v1, v0, Landroid/view/ViewGroup$MarginLayoutParams;->leftMargin:I

    iget v2, v0, Landroid/view/ViewGroup$MarginLayoutParams;->rightMargin:I

    add-int/2addr v1, v2

    add-int/2addr v1, p3

    iget v2, v0, Landroid/view/ViewGroup$MarginLayoutParams;->width:I

    invoke-static {p2, v1, v2}, Lcom/waiqin365/base/calendar/ScrollLayout;->getChildMeasureSpec(III)I

    move-result v1

    iget v2, v0, Landroid/view/ViewGroup$MarginLayoutParams;->topMargin:I

    iget v0, v0, Landroid/view/ViewGroup$MarginLayoutParams;->bottomMargin:I

    add-int/2addr v0, v2

    const/4 v2, 0x0

    invoke-static {v0, v2}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v0

    invoke-virtual {p1, v1, v0}, Landroid/view/View;->measure(II)V

    :cond_0
    return-void
.end method

.method protected onFinishInflate()V
    .locals 1

    invoke-super {p0}, Landroid/widget/FrameLayout;->onFinishInflate()V

    const v0, 0x7f0c0018

    invoke-virtual {p0, v0}, Lcom/waiqin365/base/calendar/ScrollLayout;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->d:Landroid/widget/LinearLayout;

    const v0, 0x7f0c0019

    invoke-virtual {p0, v0}, Lcom/waiqin365/base/calendar/ScrollLayout;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/calendar/views/MonthView;

    iput-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->b:Lcom/waiqin365/base/calendar/views/MonthView;

    const v0, 0x7f0c001b

    invoke-virtual {p0, v0}, Lcom/waiqin365/base/calendar/ScrollLayout;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->j:Landroid/view/View;

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->b:Lcom/waiqin365/base/calendar/views/MonthView;

    invoke-virtual {v0, p0}, Lcom/waiqin365/base/calendar/views/MonthView;->setOnLineChooseListener(Lcom/waiqin365/base/calendar/views/f;)V

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->b:Lcom/waiqin365/base/calendar/views/MonthView;

    invoke-virtual {v0, p0}, Lcom/waiqin365/base/calendar/views/MonthView;->setOnLineCountChangeListener(Lcom/waiqin365/base/calendar/views/g;)V

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->b:Lcom/waiqin365/base/calendar/views/MonthView;

    invoke-virtual {v0, p0}, Lcom/waiqin365/base/calendar/views/MonthView;->setOnMonthDateClickListener(Lcom/waiqin365/base/calendar/views/h;)V

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->b:Lcom/waiqin365/base/calendar/views/MonthView;

    invoke-virtual {v0, p0}, Lcom/waiqin365/base/calendar/views/MonthView;->setOnMonthViewChangeListener(Lcom/waiqin365/base/calendar/views/i;)V

    const v0, 0x7f0c001c

    invoke-virtual {p0, v0}, Lcom/waiqin365/base/calendar/ScrollLayout;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/calendar/views/WeekView;

    iput-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->c:Lcom/waiqin365/base/calendar/views/WeekView;

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->c:Lcom/waiqin365/base/calendar/views/WeekView;

    invoke-virtual {v0, p0}, Lcom/waiqin365/base/calendar/views/WeekView;->setOnWeekViewChangeListener(Lcom/waiqin365/base/calendar/views/p;)V

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->c:Lcom/waiqin365/base/calendar/views/WeekView;

    invoke-virtual {v0, p0}, Lcom/waiqin365/base/calendar/views/WeekView;->setOnWeekClickListener(Lcom/waiqin365/base/calendar/views/o;)V

    const v0, 0x7f0c001a

    invoke-virtual {p0, v0}, Lcom/waiqin365/base/calendar/ScrollLayout;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->e:Landroid/widget/LinearLayout;

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->b:Lcom/waiqin365/base/calendar/views/MonthView;

    invoke-virtual {v0}, Lcom/waiqin365/base/calendar/views/MonthView;->getTop()I

    move-result v0

    iput v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->h:I

    return-void
.end method

.method public onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 2

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    :cond_0
    :goto_0
    :pswitch_0
    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->a:Landroid/support/v4/widget/ViewDragHelper;

    invoke-virtual {v0, p1}, Landroid/support/v4/widget/ViewDragHelper;->shouldInterceptTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v0

    :goto_1
    return v0

    :pswitch_1
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v0

    float-to-int v0, v0

    iput v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->m:I

    goto :goto_0

    :pswitch_2
    iget v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->m:I

    int-to-float v0, v0

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v1

    sub-float/2addr v0, v1

    invoke-static {v0}, Ljava/lang/Math;->abs(F)F

    move-result v0

    float-to-int v0, v0

    iget v1, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->l:I

    if-lt v0, v1, :cond_0

    const/4 v0, 0x0

    goto :goto_1

    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_1
        :pswitch_0
        :pswitch_2
    .end packed-switch
.end method

.method protected onLayout(ZIIII)V
    .locals 5

    const/4 v4, 0x0

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->c:Lcom/waiqin365/base/calendar/views/WeekView;

    iget-object v1, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->c:Lcom/waiqin365/base/calendar/views/WeekView;

    invoke-virtual {v1}, Lcom/waiqin365/base/calendar/views/WeekView;->getMeasuredWidth()I

    move-result v1

    iget-object v2, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->c:Lcom/waiqin365/base/calendar/views/WeekView;

    invoke-virtual {v2}, Lcom/waiqin365/base/calendar/views/WeekView;->getMeasuredHeight()I

    move-result v2

    invoke-virtual {v0, v4, v4, v1, v2}, Lcom/waiqin365/base/calendar/views/WeekView;->layout(IIII)V

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->d:Landroid/widget/LinearLayout;

    iget v1, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->i:I

    iget-object v2, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->d:Landroid/widget/LinearLayout;

    invoke-virtual {v2}, Landroid/widget/LinearLayout;->getMeasuredWidth()I

    move-result v2

    iget-object v3, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->d:Landroid/widget/LinearLayout;

    invoke-virtual {v3}, Landroid/widget/LinearLayout;->getMeasuredHeight()I

    move-result v3

    invoke-virtual {v0, v4, v1, v2, v3}, Landroid/widget/LinearLayout;->layout(IIII)V

    return-void
.end method

.method protected onMeasure(II)V
    .locals 8

    const/4 v0, 0x0

    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result v3

    invoke-static {p2}, Landroid/view/View$MeasureSpec;->getMode(I)I

    move-result v4

    invoke-static {p2}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result v1

    invoke-virtual {p0, p1, p2}, Lcom/waiqin365/base/calendar/ScrollLayout;->measureChildren(II)V

    invoke-virtual {p0}, Lcom/waiqin365/base/calendar/ScrollLayout;->getChildCount()I

    move-result v5

    move v2, v0

    :goto_0
    if-ge v2, v5, :cond_1

    invoke-virtual {p0, v2}, Lcom/waiqin365/base/calendar/ScrollLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v6

    instance-of v7, v6, Lcom/waiqin365/base/calendar/views/WeekView;

    if-nez v7, :cond_0

    invoke-virtual {v6}, Landroid/view/View;->getMeasuredHeight()I

    move-result v6

    add-int/2addr v0, v6

    :cond_0
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_1
    const/high16 v2, 0x40000000    # 2.0f

    if-ne v4, v2, :cond_2

    move v0, v1

    :cond_2
    invoke-virtual {p0, v3, v0}, Lcom/waiqin365/base/calendar/ScrollLayout;->setMeasuredDimension(II)V

    return-void
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->a:Landroid/support/v4/widget/ViewDragHelper;

    invoke-virtual {v0, p1}, Landroid/support/v4/widget/ViewDragHelper;->processTouchEvent(Landroid/view/MotionEvent;)V

    const/4 v0, 0x1

    return v0
.end method

.method public setOnViewHeightChange(Lcom/waiqin365/base/calendar/b;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/base/calendar/ScrollLayout;->o:Lcom/waiqin365/base/calendar/b;

    return-void
.end method
